package model;

/**
 * EditorTool enum defines a list of possible function a LevelEditor and
 * EditorController can support.
 * 
 * @author Alexander Craig, Alex Dinardo
 */
public enum EditorTool {
	NEW_LEVEL, SET_PASS_DOTS, ADD_TILE, REMOVE_TILE, 
	ADD_WALL, ADD_WALL_LINKED, CLEAR_WALL, 
	CLEAR_WALL_LINKED, ADD_PORTAL,
	ADD_SPAWN, CLEAR_SPAWN, SET_SPAWN_TYPE, SAVE_LEVEL, LOAD_LEVEL;
	
	/**
	 * @return Returns the Tool name.
	 */
	public String toString()
	{
		switch (this){
		case NEW_LEVEL: return "New Level"; 
		case SET_PASS_DOTS: return "Set Pass Dots";
		case ADD_TILE: return "Add Tile";
		case REMOVE_TILE: return "Remove Tile";
		case ADD_WALL: return "Add One-way Wall";
		case ADD_WALL_LINKED: return "Add Wall";
		case CLEAR_WALL: return "Remove One-way Wall";
		case CLEAR_WALL_LINKED: return "Remove Wall";
		case ADD_PORTAL: return "Add Portal";
		case ADD_SPAWN: return "Add Spawn";
		case CLEAR_SPAWN: return "Clear Spawn";
		case SAVE_LEVEL: return "Save Level";
		case LOAD_LEVEL: return "Load Level";
		default: return "None";
		}
	}
	
	/**
	 * @return Returns the full description of the tool and 
	 * instructions on how to use it.
	 */
	public String getDescription()
	{
		switch (this){
		case NEW_LEVEL: return "Creates a new maze with the specified dimensions."; 
		case SET_PASS_DOTS: return "Set how many dots should be left in the level in order to achieve a win. Enter the number of dots in the above text field, then press enter, or switch tools to enter it. The number of dots cannot be bigger than how many dots are in the maze.";
		case ADD_TILE: return "Adds a tile to the selected tile area. There must not already be a tile existing in that spot. Click on an empty spot to add a tile.";
		case REMOVE_TILE: return "Removes a tile from the game area. Double click an existing tile to remove it.";
		case ADD_WALL: return "Adds a one way wall to the maze. To add a wall, click a tile using the mouse, and then specify what direction the wall should block using the WASD keys.";
		case ADD_WALL_LINKED: return "Adds a wall to the maze. To add a wall, click a tile using the mouse, and then specify what direction the wall should block using the WASD keys.";
		case CLEAR_WALL: return "Removes a one way wall from the maze. Click a tile using the mouse and then specify what direction should be cleared using the WASD keys. If the direction specified already contains a regular wall, then this remove tool turns it into a one way wall. Can also remove portals.";
		case CLEAR_WALL_LINKED: return "Removes a wall from the maze. Click a tile using the mouse and then specify what direction should be cleared using the WASD keys. Can also remove portals";
		case ADD_PORTAL: return "Adds a portal to the maze. Click a tile using the mouse to select the tile where the entry point will be located. Then right click a tile to select the destination of the portal. Use the WASD keys to choose in which direction the portal entry will appear. To remove a portal, add a wall over the entrance to the portal.";
		case ADD_SPAWN: return "Adds a spawn point to the maze. Click a tile to select it. Then choose what kind of object to spawn there using the drop down menu box. Click the selected tile again to place the spawn point there.";
		case CLEAR_SPAWN: return "Removes a spawn point from the maze. Click a tile to select it. Click that tile again to remove any spawn point that exists there.";
		default: return "";
		}
	}
}
